// source --> https://applepartsgroningen.nl/wp-content/plugins/WP_Estimation_Form/assets/js/lfb_form.min.js?ver=9.7242 var lfb_lastStepID=0,lfb_lastSteps=new Array,lfb_plannedSteps,lfb_gmapService=!1,tld_selectionMode=!1,lfb_calendars=new Array,lfb_stripe;function lfb_clearFixedElements(){jQuery("*:not(#lfb_bootstraped)").each(function(){0==jQuery(this).closest("#lfb_bootstraped").length&&"static"!=jQuery(this).css("position")&&jQuery(this).css("position","static"),0==jQuery(this).closest("#lfb_bootstraped").length&&jQuery(this).css("will-change","unset")})}function wpe_getForm(t){for(var e=!1,a=0;a .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+i.formID+'"] > .tooltip').remove())),e&&o.addClass("action"),!e&&o.is(".action")||("zoom"!=i.imgIconStyle&&o.find("span.icon_select").animate({bottom:160,opacity:0},200),o.is(".checked")?e&&o.data("required")||("zoom"==i.imgIconStyle?(o.delay(200).css("transition-delay","0.2s"),o.find("span.icon_select").css("transition-delay","0s")):o.css("transition-delay","0s"),r=220,"zoom"==i.imgIconStyle&&(r=0),o.delay(r).removeClass("checked"),"zoom"!=i.imgIconStyle?o.delay(220).find("span.icon_select").removeClass("fui-check").addClass("fui-cross"):o.find("span.icon_select").css("transition-delay","0s"),o.delay(400).css("transition-delay","0s"),o.find(".icon_quantity").delay(300).fadeOut(200)):(o.css("transition-delay","0s"),0!=i.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=i.imgTitlesStyle||t.b_tooltip("show"),"zoom"==i.imgIconStyle&&o.find("span.icon_select").css("transition-delay",".5s"),o.is('[type="checkbox"][data-checkboxstyle="checkbox"]')||o.delay(220).addClass("checked"),"zoom"!=i.imgIconStyle&&o.delay(220).find("span.icon_select").removeClass("fui-cross").addClass("fui-check"),0\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(e||void 0===e?"
":"
")+"$2")}function wpe_initForms(){jQuery.each(wpe_forms,function(){var o=this;o.price=0,o.priceSingle=0,o.priceMax=0,o.step=0,o.gFormDesignCheck=0,o.timer_gFormSubmit=null,o.timer_gFormDesign=null,o.animationsSpeed*=1e3,o.reductionResult=0,o.reduction=0,o.discountCode="",o.discountCodeDisplayed=!1,o.initialPrice=parseFloat(o.initialPrice),o.contactSent=0,o.gravitySent=!1,o.shineFxIndex=0,o.subscriptionText=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #finalPrice span:eq(1)').html(),o.richtextsContent=new Array,o.emailSent=!1,o.autoStart=!1,o.urlVariables="",o.useRazorpay=!1,o.razorpayReady=!1,o.stripeToken="",o.itemsData=new Array,o.signature=!1,jQuery('#estimation_popup[data-form="'+o.formID+'"]').is(".lfb_visualEditing")&&lfb_clearFixedElements(),jQuery('#estimation_popup[data-form="'+o.formID+'"]').is(".wpe_fullscreen")&&jQuery('#estimation_popup[data-form="'+o.formID+'"]').closest("#lfb_bootstraped").parents().css({position:"static",display:"block"}),1==o.useSignature&&(o.signature=jQuery("#lfb_signature").signature({thickness:4,guideline:!0,guidelineOffset:26}),jQuery("#lfb_resetSignature").on("click",function(){o.signature.signature("clear")}),setTimeout(function(){jQuery('#estimation_popup[data-form="'+o.formID+'"] #lfb_signature canvas').attr("width",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_signature').width()),jQuery('#estimation_popup[data-form="'+o.formID+'"] #lfb_signature canvas').css("width",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_signature').width())},500));for(var t=0;t"+jQuery(this).attr("data-tooltiptext")+"")}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] [data-type="numberfield"]:not([value])').each(function(){var t=0;jQuery(this).is("[min]")&&(t=parseInt(jQuery(this).attr("min"))),jQuery(this).val(t)});var i=o.formID;1==o.save_to_cart?o.save_to_cart=!0:o.save_to_cart=!1,1==o.save_to_cart_edd?o.save_to_cart_edd=!0:o.save_to_cart_edd=!1,0a)&&jQuery(this).val(""))})});var n=(n=wpe_forms[0].dateFormat).replace(/\\\//g,"/");jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #mainPanel .genSlide .lfb_datepicker:not(.lfb_datepickerReady)').each(function(){var t=new Date;jQuery(this).addClass("lfb_datepickerReady"),jQuery(this).is('[data-allowpast="1"]')||jQuery(this).is('[data-datetype="time"]')?t=null:jQuery(this).is('[data-allowpast="0"]')&&0jQuery(n).val().indexOf(":")?t=" PM":jQuery(n).val().indexOf("AM")>jQuery(n).val().indexOf(":")&&(t=" AM"),jQuery(n).val(jQuery(n).val().split(":")[0]+":00"+t)},50)),jQuery(this).datetimepicker("setMinutesDisabled",p))});var s=this;jQuery(this).closest(".form-group").next(".datetimepicker").find(".datetimepicker-hours thead tr:first-child th").click(function(){var p=this;setTimeout(function(){var t=jQuery(p).closest(".datetimepicker").prev(".form-group").find(".lfb_datepicker"),e=jQuery(s).datetimepicker("getViewDate");t.val("");var a=moment(e).format("YYYY-MM-DD"),r=t.attr("data-eventduration"),i=t.attr("data-eventdurationtype"),o=lfb_getDisabledHours(t.attr("data-calendarid"),a,r,i);t.data("date",a),t.is("[data-daysweek]")&&""!=jQuery(this).attr("data-daysweek")&&jQuery.each(t.attr("data-daysweek").split(","),function(){if(this==e.getDay()){o=new Array;for(var t=0;t<24;t++)o.push(t)}}),t.datetimepicker("setHoursDisabled",o)},10)}),"date"!=r&&"time"==r?jQuery(this).on("show",function(){jQuery(".datetimepicker .table-condensed .prev").hide(),jQuery(".datetimepicker .table-condensed .switch").hide(),jQuery(".datetimepicker .table-condensed .next").hide()}):jQuery(this).on("show",function(){jQuery(".datetimepicker .table-condensed .prev").show(),jQuery(".datetimepicker .table-condensed .switch").show(),jQuery(".datetimepicker .table-condensed .next").show()}),0!=jQuery(this).attr("data-calendarid")&&0 .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+o.formID+'"] > .tooltip').remove())}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #mainPanel .genSlide .genContent div.selectable span.icon_select.lfb_fxZoom').css({textShadow:"-2px 0px "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #mainPanel').css("background-color")}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').is(".wpe_popup")&&!jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').closest("#lfb_bootstraped").parent().is("body")&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').closest("#lfb_bootstraped").detach().appendTo("body"),jQuery('#estimation_popup[data-form="'+o.formID+'"]').is(".wpe_fullscreen")&&jQuery("html,body").css("overflow-y","hidden"),0'),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("a.btn-primary").mouseover(function(){0==o.shineFxIndex&&lfb_shineBtn(i,jQuery(this).find(".lfb_shineCanvas"))})),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] .lfb_dropzone').each(function(){var t=null;0
'+t+"
").css({position:"absolute",top:-55,left:-20,opacity:1}).hide(),a=1;jQuery(this).is("[data-stepslider]")&&0 .colpick").fadeOut()},onChange:function(t,e,a,r,i){jQuery(r).val("#"+e),jQuery(r).prev(".lfb_colorPreview").css({backgroundColor:"#"+e})}})}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('.lfb_colorPreview[data-urltarget],input[type="text"][data-itemid]:not(.lfb_colorpicker)[data-urltarget],textarea[data-itemid][data-urltarget],select[data-itemid][data-urltarget],input[type="number"][data-urltarget]').each(function(){jQuery(this).click(function(){var t;tld_selectionMode||"null"!=typeof(t=window.open(jQuery(this).attr("data-urltarget"),"_blank"))&&null!=t&&t.focus()})}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('[data-autocomplete="1"]').each(function(){var t={};"city"==jQuery(this).attr("data-fieldtype")?t.types=["(cities)"]:"address"==jQuery(this).attr("data-fieldtype")?0 a').click(function(){tld_selectionMode||("less"==jQuery(this).attr("data-btn")?wpe_quantity_less:wpe_quantity_more)(this,i)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] .linkPrevious').click(function(){tld_selectionMode||wpe_previousStep(i)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] .btn-next').click(function(){tld_selectionMode||wpe_nextStep(i)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #btnOrderPaypal').click(function(){tld_selectionMode||wpe_order(i)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #finalSlide [data-toggle="switch"]').change(function(){wpe_toggleField(jQuery(this).attr("data-fieldid"),i)});var e=!1;jQuery(".gform_wrapper").each(function(){jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1,jQuery(this).attr("id").length)==o.gravityFormID&&(e?jQuery(this).remove():(e=!0,jQuery(this).detach().insertAfter('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #finalPrice')))}),setTimeout(function(){var t;1parseInt(jQuery(this).attr("max"))&&jQuery(this).val(jQuery(this).attr("max")),wpe_updatePrice(o.formID),wpe_updateSummary(o.formID)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] input[type="number"][data-itemid]').keydown(function(t){return 69!=t.keyCode}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] input[type="number"][data-itemid]').on("focusin",function(){0==jQuery(this).val()&&jQuery(this).val("")}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] input[type="number"][data-itemid]').on("keyup change",function(){wpe_updatePrice(o.formID),wpe_updateSummary(o.formID)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] input[type="number"][data-itemid]').focusout(function(){""==jQuery(this).val()&&jQuery(this).val(0),0==jQuery(this).val()&&!jQuery(this).is('[data-required="true"]')||(-1parseFloat(jQuery(this).attr("max"))&&jQuery(this).val(jQuery(this).attr("max")),""!=jQuery(this).val()&&!isNaN(parseInt(jQuery(this).val()))||jQuery(this).val(0),""!=jQuery(this).val()&&(jQuery(this).is('[data-valueasqt="0"]')||0
'+t+"
").css({position:"absolute",top:-55,left:-20,opacity:1}).hide(),e=1;jQuery(this).closest(".quantityBtns").is("[data-stepslider]")&&0'),jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").next().is("br")||jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").after("
"),jQuery(this).is(":checked")&&jQuery(this).trigger("click")}),jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper input[type="checkbox"]:not(.ready)').each(function(){jQuery(this).addClass("ready");jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').html();jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").css("display","inline-block"),jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').append(jQuery(this)),jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').addClass("checkbox"),jQuery(this).before(''),jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").next().is("br")||jQuery("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+jQuery(this).attr("id")+'"]').parent("li").after("
")}),jQuery("#gform_wrapper_"+a.gravityFormID+" .gform_wrapper label.checkbox").each(function(){0').parent().bootstrapSwitch(),jQuery('#estimation_popup.wpe_bootstraped [data-toggle="switch"][data-checkboxstyle="switch"]').on("change",function(){jQuery(this).is(":checked")||jQuery(this).removeClass("checked")}),jQuery("#estimation_popup.wpe_bootstraped input[type=checkbox][data-urltarget]").each(function(){jQuery(this).closest(".switch.has-switch").click(function(){var t;tld_selectionMode||0
",jQuery(this).attr("data-file").replace(/ /g,"_")}),y=jQuery(_).data("title"),jQuery(_).is("[data-originallabel]")&&(y=jQuery(_).attr("data-originallabel")),-1==jQuery.inArray(jQuery(_).attr("data-itemid"),b)&&(b.push(jQuery(_).attr("data-itemid")),p={label:y,itemid:jQuery(_).attr("data-itemid"),type:h.attr("data-itemtype"),value:d,step:$panel.attr("data-title"),stepid:o,showInSummary:s,isFile:!0,files:l})),0

"+$panel.data("title")+" :


",o+="\n\n---------"+$panel.data("title")+" :---------\n";var u=new Array;$panel.find(".itemBloc:not(.lfb_disabled)").each(function(){var t=0,t=(0",o+=" - "+u[m].label+" : "+u[m].value+" ("+u[m].price+")\n"):void 0!==u[m].quantity&&1",o+=" - "+u[m].label+" : "+u[m].quantity+" ("+u[m].price+")\n"):(i+=" - "+u[m].label+" : "+u[m].price+"
",o+=" - "+u[m].label+" : "+u[m].price+"\n"):void 0!==u[m].value?(i+=" - "+u[m].label+" : "+u[m].value+"
",o+=" - "+u[m].label+" : "+u[m].value+"\n"):void 0!==u[m].quantity&&1",o+=" - "+u[m].label+" : "+u[m].quantity+"\n"):(i+=" - "+u[m].label+"
",o+=" - "+u[m].label+"\n"))}}(!r.price||r.price<0)&&(r.price=0);return/^\d+(\.\d{2})?$/.test(r.price)||(r.price=parseFloat(r.price).toFixed(2)),""!=r.discountCode&&(0 Coupon : "+r.discountCode+" ("+a+")"):i+="
Coupon : "+r.discountCode),"left"==r.currencyPosition?(p+=r.currency+wpe_formatPrice(parseFloat(r.price).toFixed(2),t),o+="\n\nTotal : "+r.currency+wpe_formatPrice(parseFloat(r.price).toFixed(2),t)):(p+=wpe_formatPrice(parseFloat(r.price).toFixed(2),t)+r.currency,o+="\n\nTotal : "+wpe_formatPrice(parseFloat(r.price).toFixed(2),t)+r.currency),new Array(i,p,s,o)}function wpe_check_gform_response(t){var e,a,r=wpe_getForm(t);0'),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm').append(''),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm').append('')),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=a1]').val(a),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=p1]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=p3]').val())):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=a1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=t1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=p1]').remove()),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=amount]').val(e),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=a3]').val(e),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=item_number]').val(r.current_ref),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=item_name]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [name=item_name]').val()+" - "+r.current_ref),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #wtmt_paypalForm [type="submit"]').trigger("click")):(jQuery("#finalText").html(jQuery("#gform_wrapper_"+r.gravityFormID+" .gforms_confirmation_message").html()),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #finalSlide #gforms_confirmation_message').fadeIn(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #finalSlide #lfb_summary').fadeOut(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #finalSlide #lfb_couponContainer').fadeOut(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #finalSlide #lfb_legalNoticeContent').fadeOut(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #finalSlide .linkPrevious').fadeOut(),wpe_finalStep(t)))}function wpe_quantity_less(t,e){var a=jQuery(t).parent().parent().find(".icon_quantity"),r=parseFloat(jQuery(t).parent().data("min")),t=parseInt(a.html());1 tr > th:eq(1)').is(".lfb-hidden")&&(a.find("table thead > tr > th:eq(1)").remove(),a.find("table tbody td.lfb_valueTd").remove()),a.find("th.sfb_summaryStep").attr("align","center"),a.find("table").attr("width","90%"),a.find("table").css("width","90%"),a.find("table").attr("border","1"),a.find("table").attr("bordercolor",lfb_rgb2hex(a.find("table").css("border-color"))),a.find("table").attr("style","width:90%;margin:0 auto;"),a.find("thead td, thead th").each(function(){jQuery(this).attr("bgcolor",lfb_rgb2hex(a.find("thead").css("background-color"))),jQuery(this).css("background",lfb_rgb2hex(a.find("thead").css("background-color")))}),a.find("th").each(function(){jQuery(this).attr("bgcolor",lfb_rgb2hex(jQuery(this).css("background-color")))}),a.find("td,th").each(function(){jQuery(this).attr("color",lfb_rgb2hex(jQuery(this).css("color"))),jQuery(this).html(''+jQuery(this).html()+"")}),a.find("table .lfb-hidden").remove(),a.find("table").attr("cellspacing","0"),a.find("table").attr("cellpadding","8"),a.find("table").attr("bgcolor","#FFFFFF"),a.find("td,th").each(function(){jQuery(this).attr("align",jQuery(this).css("text-align")),jQuery(this).css("padding",jQuery(this).css("padding"))}),"1"==form.summary_showAllPricesEmail&&(a.find(".sfb_summaryStep").attr("colspan",r),a.find("#lfb_summaryDiscountTr>th:eq(0),#sfb_summaryTotalTr>th:eq(0)").attr("colspan",r-1)),3==r?(a.find("td:not(:first-child)").each(function(){jQuery(this).attr("width","164")}),a.find("th:not(:first-child)").each(function(){jQuery(this).attr("width","164")}),a.find("tr>td:first-child").each(function(){jQuery(this).attr("width","340")}),a.find("tr>th:first-child").each(function(){jQuery(this).attr("width","340")})):(a.find("td:not(:first-child)").each(function(){jQuery(this).attr("width","103")}),a.find("th:not(:first-child)").each(function(){jQuery(this).attr("width","103")}),a.find("tr>td:first-child").each(function(){jQuery(this).attr("width","332")}),a.find("tr>th:first-child").each(function(){jQuery(this).attr("width","332")})),a.find("*:not(.lfb_value)").each(function(){var t=lfb_rgb2hex(jQuery(this).css("color"));jQuery(this).css({color:""}),jQuery(this).attr("style",jQuery(this).attr("style")+";color:"+t),0'+a.html()+""),a}function wpe_getContactInformations(t,e){var a;e?a={email:"",phone:"",firstName:"",lastName:"",address:"",city:"",state:"",zip:"",country:"",job:"",phoneJob:"",url:"",company:""}:((a=new Array).email="",a.phone="",a.firstName="",a.lastName="",a.address="",a.city="",a.state="",a.zip="",a.country="",a.job="",a.phoneJob="",a.url="",a.company=""),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] [data-fieldtype="email"]').each(function(){0/g,"")).replace(/<\/span>/g,"")).substr(3,t.length),1==r.emailCustomerLinks&&(t="",e.find(".dz-success.dz-complete").each(function(){t+=jQuery(this).attr("data-url")+","}),0/gi,"\n")),-1==o.indexOf(e)&&(o.push(e),i+="&"+e+"="+t)))}),0/g,"[n]"),i=n[1],o=n[2];s.urlVariables="",1==s.sendUrlVariables&&(s.urlVariables=lfb_getUrlVariables(p,n[2],!0)),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+p+'"]').is("[data-subs]")&&(i+=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+p+'"]').attr("data-subs"));var d=0,l=!0;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+p+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=jQuery(this).closest(".genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(l=!1)}),0'),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm').append(''),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm').append('')),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=a1]').val(a),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=p1]').val(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=p3]').val()),e<=0&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=cmd]').val("_xclick"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=a3]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=t3]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=p3]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=bn]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=no_note]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=src]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=a1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=t1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=p1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm').append(''))):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=a1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=t1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=p1]').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name=amount]').val(e)),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+s.formID+'"] #wtmt_paypalForm [name="return"]').val(lfb_getRedirectionURL(p)),""!=(a=lfb_getRedirectionURL(p))&&"#"!=a&&" "!=a&&(""!=s.urlVariables&&-1'+jQuery(this).val()+""+t+" "+jQuery(this).closest(".lfb_item").find("label").html()+"

":r+="

"+jQuery(this).closest(".lfb_item").find("label").html()+" "+t+' '+jQuery(this).val()+"

"))}),a=lfb_checkStepItemsValid("final",t),1==e.legalNoticeEnable&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_legalCheckbox').is(":checked")||(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #lfb_legalCheckbox').closest(".form-group").addClass("has-error"),a=!1)),1==a&&lfb_checkUserEmail(e)&&lfb_checkCaptcha(e,function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #finalSlide').find("#wpe_btnOrder,.linkPrevious").fadeOut(250),wpe_uploadFiles(t,r,"",i)})}function wpe_previousStep(a){var r=wpe_getForm(a),t=navigator.userAgent.toLowerCase(),e=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel').offset().top-100;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"]').is(".wpe_fullscreen")||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"]').is(".wpe_popup")?((e=0) .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+r.formID+'"] > .tooltip').remove()),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] .errorMsg').hide(),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find("a.lfb_button.checked:not(.prechecked)").each(function(){wpe_itemClick(jQuery(this),!1,a)}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find("div.selectable.checked:not(.prechecked)").each(function(){wpe_itemClick(jQuery(this),!1,a)}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find('input[data-toggle="switch"]:checked:not(.prechecked)').each(function(){jQuery(this).trigger("click.auto")});var i=!1,o=0,p=0;jQuery.each(lfb_lastSteps,function(t){var e=this;parseInt(e)==parseInt(r.step)&&(i=!0),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+e+'"] .lfb_executed').removeClass("lfb_executed"),i||(0 .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+r.formID+'"] > .tooltip').remove()),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] .errorMsg').hide(),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find("a.lfb_button.checked:not(.prechecked)").each(function(){wpe_itemClick(jQuery(this),!1,e)}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find("div.selectable.checked:not(.prechecked)").each(function(){wpe_itemClick(jQuery(this),!1,e)}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e+'"] #mainPanel .genSlide[data-stepid="'+r.step+'"]').find('input[data-toggle="switch"]:checked:not(.prechecked)').each(function(){jQuery(this).trigger("click.auto")}),a=lfb_lastSteps.indexOf(t),lfb_lastSteps=jQuery.grep(lfb_lastSteps,function(t,e){if(e<=a)return t}),wpe_changeStep(t,e),setTimeout(function(){wpe_updateSummary(e,!0)},350),setTimeout(function(){wpe_updateStep(e)},2e3))}function wpe_uploadFiles(p,s,t,n){var e,a,r=!0,d=wpe_getForm(p);d.useRazorpay&&!d.razorpayReady?(r=!1,e=d.price,a=0,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d.formID+'"]').is('[data-isSubs="true"]')&&(a=d.price,(e=0)th:eq(0),#sfb_summaryTotalTr>th:eq(0)").attr("colspan",e.find("thead th:not(.lfb-hidden)").length-1),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] #lfb_floatingSummary #lfb_floatingSummaryInner').html(e),e.find(".sfb_summaryStep").click(function(){var t=jQuery(this).closest("#estimation_popup").attr("data-form"),e=wpe_getForm(t),a=parseInt(jQuery(this).attr("data-step"));void 0!==e.canGoprevious&&!e.canGoprevious||lfb_returnToStep(a,t)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').is('[data-numberstep="1"]')&&e.find(".sfb_summaryStep").each(function(t){t+=1;jQuery(this).find("strong").html(t+". "+jQuery(this).find("strong").html())})))}function wpe_updateSummary(d,t){var l,u,m,e,a,r,i,o,f=wpe_getForm(d);(0'+p+"")),l=n.stepid,isNaN(n.quantity)&&(n.quantity=1),t="",isNaN(n.price)&&(t="lfb_noPriceRow",n.price=0),e=n.value,void 0===n.value?e="":t+=" lfb_infoRow",""!=e&&n.showInSummary&&(u=!0),a=n.price,r=wpe_formatPrice(n.quantity,d),""!=e&&0==a&&1==r?a=r="":(s=!1,parseFloat(a)<0&&(s=!0,a*=-1),a="left"==f.currencyPosition?f.currency+""+wpe_formatPrice(parseFloat(a).toFixed(2),d):wpe_formatPrice(parseFloat(a).toFixed(2),d)+""+f.currency,s&&(a="- "+a)),n.isFile,i="",1==f.summary_hideQt&&(i="lfb-hidden"),1==f.summary_hideZero&&0==n.price&&(a=""),1==f.summary_hideZeroQt&&0==n.quantity&&(r=""),o="",n.showInSummary||(o="lfb-hidden"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-itemid="'+n.itemid+'"]').is('[data-hideqtsum="true"]')&&(r=""),0":0")),s=!0,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] [data-itemid="'+n.itemid+'"]').is('[data-hidezeropricesum="true"]')&&0==n.price&&(s=!1),s&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] .lfb_itemContainer_'+n.itemid).is('[data-itemtype="filefield"]')?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before(''+n.label+p+''+e+''+r+''+a+""):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before(''+n.label+p+''+e+''+r+''+a+""))))}),0span').html(r),f.discountCodeDisplayed||(e=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(),0==jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan] i').length&&(":"==e.substr(e.length-1,1)?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(e.substr(0,e.length-1)+" ("+f.discountCode+") :"):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(e+" ("+f.discountCode+")"))),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr').slideDown(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_floatingSummary #lfb_summaryDiscountTr').slideDown()),1==f.useVAT&&(0==jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_vatRow').length&&((a=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr').clone()).attr("id","lfb_vatRow"),a.find("#lfb_summaryDiscount").attr("id","lfb_summaryVat"),a.children("th").first().html(f.vatLabel+" "+f.vatAmount+"% :"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryDiscountTr').after(a)),i=f.currency+wpe_formatPrice(parseFloat(f.vatPrice).toFixed(2),d),"left"!=f.currencyPosition&&(i=wpe_formatPrice(parseFloat(f.vatPrice).toFixed(2),d)+f.currency),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary #lfb_summaryVat').html(i)),(!f.price||f.price<0)&&(f.price=0),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tr th.sfb_summaryStep').each(function(){0==jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tr[data-itemstep="'+jQuery(this).attr("data-step")+'"]:not(.lfb-hidden)').length&&jQuery(this).parent().addClass("lfb-hidden")}),r=f.currency+""+wpe_formatPrice(parseFloat(f.price).toFixed(2),d),f.currency,wpe_formatPrice(parseFloat(f.priceSingle).toFixed(2),d),"left"!=f.currencyPosition&&(r=wpe_formatPrice(parseFloat(f.price).toFixed(2),d)+""+f.currency,wpe_formatPrice(parseFloat(f.priceSingle).toFixed(2),d),f.currency),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f.formID+'"]').is("[data-totalrange]")&&0"+f.currency+wpe_formatPrice(r,d)+" "+a+" "+f.currency+wpe_formatPrice(o,d)+"","left"!=f.currencyPosition&&(i=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+f.formID+'"]').attr("data-totalrange")),formatedPrice=e+" "+wpe_formatPrice(r,d)+f.currency+" "+a+" "+wpe_formatPrice(o,d)+f.currency+""),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(formatedPrice)),o=4,1==f.summary_hideQt&&--o,1==f.summary_hidePrices&&--o,u?(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table thead th:eq(1)').show().removeClass("lfb-hidden"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody tr:eq(1)').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody td.lfb_valueTd').show()):(--o,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table td.lfb_valueTd').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table thead th:eq(1)').hide().addClass("lfb-hidden")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody tr#sfb_summaryTotalTr th[colspan]').attr("colspan",o-1),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody tr#lfb_summaryDiscountTr th[colspan]').attr("colspan",o-1),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+d+'"] #lfb_summary table tbody tr th.sfb_summaryStep').attr("colspan",o)),0 .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+r.formID+'"] > .tooltip').remove(),jQuery('#estimation_popup[data-form="'+r.formID+'"] .datetimepicker ').hide(),(0 .lfb_btnNextContainer').hide():(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+e+'"] .lfb_btnNextContainer').fadeIn(500),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+e+'"] .lfb_btnNextContainerStripe').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #lfb_paymentMethodBtns').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #lfb_stripeForm .lfb_stripeContainer').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #lfb_stripeForm .lfb_btnNextContainer').hide()),1==r.useSignature&&(jQuery('#estimation_popup[data-form="'+r.formID+'"] #lfb_signature canvas').attr("width",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #lfb_signature').width()),jQuery('#estimation_popup[data-form="'+r.formID+'"] #lfb_signature canvas').css("width",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #lfb_signature').width()),r.signature.signature("clear"))):jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+e+'"] .lfb_btnNextContainer').fadeIn(500),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"]').is('[data-previousstepbtn="true"]')&&"final"==e?setTimeout(function(){var t=!1;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] .genSlide[data-stepid="'+e+'"] ').find(".btn-next,#btnOrderPaypal,#lfb_btnPayStripe,#wpe_btnOrder,#btnOrderRazorpay").each(function(){"none"!=jQuery(this).css("display")&&"none"!=jQuery(this).closest(".lfb_btnNextContainer").css("display")&&(t=!0)}),t?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] .genSlide[data-stepid="'+e+'"] ').find(".linkPrevious").css({marginTop:-15}):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] .genSlide[data-stepid="'+e+'"] ').find(".linkPrevious").css({marginTop:24}),0 .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+a+'"] > .tooltip').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"]').trigger("stepChanged"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"]').attr("data-currentstep",e)},2*r.animationsSpeed+550),wpe_updatePrice(a),r.backFomFinal&&(r.backFomFinal=!1)},300)},d),0==r.animationsSpeed&&setTimeout(lfb_resizeAll,500),jQuery("#estimation_popup :not(.ui-slider-handle) > .tooltip").remove(),jQuery("body > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+a+'"] > .tooltip').remove(),wpe_updatePrice(a)}function lfb_zeroIfNan(t){return isNaN(t)?0:t}function wpe_findPotentialsSteps(i,o){var t=wpe_getForm(o),p=new Array,s=new Array,n=new Array,d=0;return jQuery.each(t.links,function(){var t,e,a,r=this;r.originID==i&&(a=!(e=!1),a=r.conditions&&"[]"!=r.conditions?(r.conditionsO=JSON.parse(r.conditions),e=(t=lfb_checkConditions(r.conditionsO,o,i)).error,t.errorOR):(n.push(r.destinationID),!1),("OR"==r.operator&&!a||"OR"!=r.operator&&!e)&&(r.conditionsO=JSON.parse(r.conditions),s.push({stepID:parseInt(r.destinationID),nbConditions:r.conditionsO.length}),r.conditionsO.length>d&&(d=r.conditionsO.length),p.push(parseInt(r.destinationID))))}),0==i&&p.push(parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o+'"] #mainPanel .genSlide[data-start="1"]').attr("data-stepid"))),0==p.length?p.push("final"):0e.value&&(j=!1);break;case"PriceInferior":n=parseFloat(s.data("resprice"));(s.is(".lfb_button:not(.checked)")||s.is(".selectable:not(.checked)")||s.is("input[type=checkbox]:not(:checked)")||n>=e.value)&&(h=!0),(s.is(".checked")||s.is(":checked"))&&ne.value||parseInt(s.find(".wpe_qtfield").val())>e.value)&&(j=!1):s.is('[data-type="slider"]')&&s.is(".ui-slider")&&parseInt(s.slider("value"))>e.value&&(j=!1),s.is("input")&&(parseInt(s.val())<=e.value&&(h=!0),parseInt(s.val())>e.value&&(j=!1));break;case"QtInferior":(s.is(".selectable:not(.checked)")||0=e.value||0=e.value||s.is('[data-type="slider"]')&&s.is(".ui-slider")&&parseInt(s.slider("value"))>=e.value)&&(h=!0),s.is(".selectable")?(s.is(".selectable.checked")&&parseInt(s.find(".icon_quantity").html())=e.value&&(h=!0),parseInt(s.val())moment(e.value).format("YYYY-MM-DD 00:00")&&(j=!1)):s.is('[data-datetype="time"]')?(moment(s.datetimepicker("getDate")).format("HH:mm")<=e.value&&(h=!0),moment.utc(s.datetimepicker("getDate")).format("HH:mm")>e.value&&(j=!1)):(moment.utc(s.datetimepicker("getDate")).isSameOrBefore(moment.utc(e.value).format("YYYY-MM-DD HH:mm"))&&(h=!0),moment.utc(s.datetimepicker("getDate")).isAfter(moment.utc(e.value).format("YYYY-MM-DD HH:mm"))&&(j=!1)):s.is(".lfb_timepicker")?(r=parseInt(e.value.substr(0,e.value.indexOf(":"))),i=parseInt(e.value.substr(e.value.indexOf(":")+1,2)),0parseFloat(e.value)&&(j=!1)):s.is('[data-itemtype="rate"]')&&(parseFloat(s.find(".lfb_rate").rate("getValue"))<=parseFloat(e.value)&&(h=!0),parseFloat(s.find(".lfb_rate").rate("getValue"))>parseFloat(e.value)&&(j=!1));break;case"inferior":s.is(".lfb_datepicker")?s.is('[data-datetype="date"]')?(moment.utc(s.datetimepicker("getDate")).format("YYYY-MM-DD")>=e.value&&(h=!0),moment.utc(s.datetimepicker("getDate")).format("YYYY-MM-DD")=e.value&&(h=!0),moment.utc(s.datetimepicker("getDate")).format("HH:mm")=parseFloat(e.value)&&(h=!0),parseFloat(s.val())=parseFloat(e.value)&&(h=!0),parseFloat(s.find(".lfb_rate").rate("getValue"))e.value&&(j=!1);break;case"inferior":f>=e.value&&(h=!0),fe.value&&(j=!1);break;case"inferior":c>=e.value&&(h=!0),cparseFloat(e.value)&&(j=!1);break;case"inferior":parseFloat(form.price)>=parseFloat(e.value)&&(h=!0),parseFloat(form.price)e.value&&(j=!1);break;case"inferior":c>=e.value&&(h=!0),ce.value&&(j=!1);break;case"inferior":_>=e.value&&(h=!0),_parseInt(jQuery(this).attr("data-validmax"))&&(t=!0),jQuery(this).is("[data-validcar]")&&""!=jQuery(this).attr("data-validcar")&&(e=jQuery(this),-1parseInt(jQuery(this).attr("data-maxfiles")))&&(o=!1,jQuery(this).parent().addClass("has-error"),p||lfb_scrollToItem(jQuery(this),r,i))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"]').find('textarea[data-required="true"]:not(.lfb_disabled)').each(function(){0==jQuery(this).closest("#lfb_stripeForm").length&&0==jQuery(this).closest("#wtmt_paypalForm").length&&jQuery(this).val().length<1&&(o=!1,jQuery(this).closest(".form-group").addClass("has-error"),p||lfb_scrollToItem(jQuery(this),r,i))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"]').find('input[type=checkbox][data-required="true"]:not(.lfb_disabled)').each(function(){jQuery(this).is(":checked")||jQuery(this).is("[data-group]")&&(""==jQuery(this).attr("data-group")||0!=jQuery(' #estimation_popup[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"] [data-group="'+jQuery(this).attr("data-group")+'"]:checked').length)||(o=!1,jQuery(this).closest(".form-group,p,.itemBloc").addClass("has-error"),p||lfb_scrollToItem(jQuery(this),r,i))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"]').find('.selectable[data-required="true"]:not(.lfb_disabled)').each(function(){jQuery(this).is(".checked")||jQuery(this).is("[data-group]")&&(""==jQuery(this).attr("data-group")||0!=jQuery(' #estimation_popup[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"] [data-group="'+jQuery(this).attr("data-group")+'"].checked').length)||(o=!1,jQuery(this).find(".icon_select").addClass("lfb_error"),p||lfb_scrollToItem(jQuery(this),r,i))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"]').find('.lfb_button[data-required="true"]:not(.lfb_disabled)').each(function(){jQuery(this).is(".checked")||jQuery(this).is("[data-group]")&&(""==jQuery(this).attr("data-group")||0!=jQuery(' #estimation_popup[data-form="'+i+'"] #mainPanel .genSlide[data-stepid="'+r+'"] [data-group="'+jQuery(this).attr("data-group")+'"].checked').length)||(o=!1,jQuery(this).find(".icon_select").addClass("lfb_error"),p||lfb_scrollToItem(jQuery(this),r,i))}),"final"==r&&1==t.useSignature&&0==JSON.parse(t.signature.signature("toJSON")).lines.length&&(o=!1,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] #lfb_signature').addClass("has-error"),p||lfb_scrollToItem(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] #lfb_signature'),r,i),p=!0),o}function wpe_nextStep(t){var e=wpe_getForm(t);jQuery("#lfb_bootstraped :not(.ui-slider-handle) > .tooltip").remove(),jQuery('#estimation_popup[data-form="'+e.formID+'"] > .tooltip').remove(),navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)&&setTimeout(function(){jQuery("#lfb_bootstraped :not(.ui-slider-handle) > .tooltip").remove()},500),lfb_updateShowSteps(t),jQuery(".errorMsg").hide();var a=!0,r=!0,i=wpe_findPotentialsSteps(e.step,t);0 p').slideDown(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary').css({display:"inline-block"}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').css({display:"inline-block"}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #btnStart').parent().fadeOut(e.animationsSpeed,function(){"2"!=e.showSteps&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"]').find(".genPrice,#lfb_stepper").fadeIn(e.animationsSpeed),e.autoStart||jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+e.formID+'"] #mainPanel').fadeIn(e.animationsSpeed+e.animationsSpeed/2,function(){wpe_nextStep(t)})})}function wpe_initListeners(r){var i=wpe_getForm(r);jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide div.selectable .img, #estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide div.selectable .icon_select').click(function(){tld_selectionMode||wpe_itemClick(jQuery(this).parent(),!0,r)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide a.lfb_button').click(function(){tld_selectionMode||wpe_itemClick(jQuery(this),!0,r)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide [data-callnextstep="1"]').click(function(){!tld_selectionMode&&jQuery(this).is(".checked")&&wpe_nextStep(r)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel input[type=checkbox][data-price]').change(function(){jQuery(this).is('[data-usedistance="true"]')&&lfb_removeDistanceError(jQuery(this).attr("data-itemid"),r);var t=jQuery(this);t.data("group")&&t.closest(".genSlide").find('a.lfb_button.checked[data-group="'+t.data("group")+'"]:not([data-itemid="'+t.attr("data-itemid")+'"])').each(function(){wpe_itemClick(jQuery(this),!1,r),jQuery(this).removeClass("checked")}),wpe_updatePrice(r,jQuery(this).attr("data-itemid"))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel input[type=checkbox][data-group]').change(function(t){var e=jQuery(this);e.is(":checked")&&(jQuery(this).closest(".genSlide").find('div.selectable.checked[data-group="'+e.data("group")+'"]').each(function(){wpe_itemClick(jQuery(this),!1,r)}),jQuery(this).closest(".genSlide").find('input[type=checkbox][data-group="'+e.data("group")+'"]:checked').each(function(){jQuery(this).is(e)||jQuery(this).trigger("click.auto")}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+r+'"]').is('[data-autoclick="1"]')&&0==e.closest(".genSlide").find("[data-itemid]").not('[data-group="'+e.data("group")+'"]').length&&wpe_nextStep(wpe_getForm(r).formID))}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide select[data-itemid]').change(function(){var t=jQuery(this).val(),e=0;jQuery(this).find("option").each(function(){jQuery(this).attr("value")==t&&(e=jQuery(this).attr("data-price"))}),jQuery(this).attr("data-price",e),jQuery(this).data("price",e),wpe_updatePrice(r)}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #mainPanel .genSlide select[data-itemid]').trigger("change"),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i.formID+'"] #mainPanel input[type=checkbox][data-price]').change(function(){}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i.formID+'"] #mainPanel .genSlide input.wpe_qtfield').change(function(){wpe_updatePrice(r,jQuery(this).attr("data-itemid"))}),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+i.formID+'"] #mainPanel .genSlide').find("input[type=text][data-title],textarea[data-title],input[type=file][data-title],input[type=number][data-title]").change(function(){0');t.css({width:jQuery(this).get(0).width,height:jQuery(this).get(0).height}),jQuery(this).hide(),jQuery(this).after(t);var e=t.get(0).getContext("2d"),a=new Image;a.onload=function(){e.fillStyle=r.colorA,e.fillRect(0,0,t.get(0).width,t.get(0).height),e.fill(),e.globalCompositeOperation="destination-in",e.drawImage(a,0,0,t.get(0).width,t.get(0).height)},jQuery(this).is("[data-lazy-src]")?a.src=jQuery(this).attr("data-lazy-src"):a.src=jQuery(this).attr("src")}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #mainPanel .genSlide div.selectable img[data-tint="false"]').each(function(){jQuery(this).is("[data-src]")&&jQuery(this).attr("src",jQuery(this).attr("data-src"))}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #mainPanel .genSlide div.selectable.checked , #estimation_popup.wpe_bootstraped[data-form="'+r.formID+'"] #mainPanel .genSlide input[type=checkbox]:checked').hover(function(){jQuery(this).addClass("lfb_hover")},function(){jQuery(this).removeClass("lfb_hover")})}function lfb_getDistanceCalc(t,r,i,e,o,p){var s;google.maps.UnitSystem.METRIC;return"route"==wpe_getForm(r).distancesMode?(lfb_gmapService=new google.maps.DistanceMatrixService).getDistanceMatrix({origins:[e],destinations:[o],travelMode:google.maps.TravelMode.DRIVING,unitSystem:google.maps.UnitSystem.METRIC,avoidHighways:!1,avoidTolls:!1},function(t,e){var a=!1;e==google.maps.DistanceMatrixStatus.OK?(e=0,t.rows[0].elements[0].distance?(e=t.rows[0].elements[0].distance.value,e/=1e3,"miles"==p?e*=.62:"mins"==p?e=Math.round(parseInt(t.rows[0].elements[0].duration.value)/60):"hours"==p&&(e=Math.round(parseInt(t.rows[0].elements[0].duration.value)/60/60))):a=!0,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] [data-itemid="'+i+'"]'),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] [data-itemid="'+i+'"]').attr("data-distance",e),wpe_updateSummary(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #lfb_summary table tr[data-itemstep="'+i+'"] td:eq(2)').html(e),wpe_updatePrice(r),lfb_removeDistanceError(i,r)):a=!0,a&&lfb_showDistanceError(i,r)}):(s=new google.maps.Geocoder).geocode({address:e},function(t,e){var a;void 0!==t[0]?(a=t[0].geometry.location,s.geocode({address:o},function(t,e){void 0!==t[0]?(t=t[0].geometry.location,t=google.maps.geometry.spherical.computeDistanceBetween(a,t),t/=1e3,"miles"==p&&(t*=.62),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] [data-itemid="'+i+'"]'),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] [data-itemid="'+i+'"]').attr("data-distance",t),wpe_updateSummary(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+r+'"] #lfb_summary table tr[data-itemstep="'+i+'"] td:eq(2)').html(t),wpe_updatePrice(r),lfb_removeDistanceError(i,r)):lfb_showDistanceError(i,r)})):lfb_showDistanceError(i,r)}),0}function lfb_executeCalculation(calculation,formID,targetID){calculation=calculation.replace(/\\/g,"");var form=wpe_getForm(formID),price=0,i=0,elementsToReplace=new Array,itemData=lfb_getItemData(form,targetID),_stepID=itemData.stepid,isVariable=!1;for(-1

'+a.txtDistanceError+"

");t=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"] [data-itemid="'+t+'"]').closest(".genSlide").attr("data-stepid");"final"!=a.step||a.backFomFinal||(a.backFomFinal=!0,wpe_changeStep(t,e)),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+e+'"]').trigger("lfb_distanceError")}function wpe_updateLabelItem(t,e){form=wpe_getForm(e),t.is(".dropzone")||(t.closest(".itemBloc").find("label").each(function(){-1 label").first().html(t.attr("data-original-label")),0"+form.currency+wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : "+form.currency+wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : "+form.currency+wpe_formatPrice(o[s],n)+"")):"-"==jQuery(this).data("operation")?(jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+form.currency+wpe_formatPrice(o[s],n)+""),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : -"+form.currency+wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+form.currency+wpe_formatPrice(o[s],n)+"")):"x"==jQuery(this).data("operation")?(jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : +"+wpe_formatPrice(o[s],n)+"%"),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : +"+form.currency+wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : +"+wpe_formatPrice(o[s],n)+"%")):(jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+wpe_formatPrice(o[s],n)+"%"),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : -"+form.currency+wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+wpe_formatPrice(o[s],n)+"%")),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),wpe_updateLabelItem(jQuery(this),n)):(jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")),jQuery(this).is("[data-tooltiptext]")?jQuery(this).attr("data-original-title",jQuery(this).attr("data-tooltiptext")):jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle"))):jQuery(this).is('[data-showprice="1"]')?("+"==jQuery(this).attr("data-operation")?(jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : "+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : "+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : "+wpe_formatPrice(o[s],n)+form.currency+"")):"-"==jQuery(this).attr("data-operation")?(jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : -"+ +wpe_formatPrice(o[s],n)+""),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : -"+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+wpe_formatPrice(o[s],n)+form.currency+"")):"x"==jQuery(this).attr("data-operation")?(jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : +"+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : +"+wpe_formatPrice(o[s],n)+"%"),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : +"+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : +"+wpe_formatPrice(o[s],n)+"%")):(jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")+" : -"+wpe_formatPrice(o[s],n)+form.currency+""),jQuery(this).attr("title",jQuery(this).data("originaltitle")+" : --"+wpe_formatPrice(o[s],n)+"%"),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")+" : -"+wpe_formatPrice(o[s],n)+"%")),0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).is('[data-type="slider"]')||jQuery(this).is(".lfb_button")||""!=form.imgTitlesStyle||jQuery(this).b_tooltip("fixTitle"),wpe_updateLabelItem(jQuery(this),n)):(jQuery(this).attr("data-original-label",jQuery(this).data("originallabel")),jQuery(this).is("[data-tooltiptext]")?jQuery(this).attr("data-original-title",jQuery(this).attr("data-tooltiptext")):jQuery(this).attr("data-original-title",jQuery(this).data("originaltitle")))):(jQuery(this).data("resprice",parseFloat(jQuery(this).data("price"))*parseFloat(a)),form.price=parseFloat(form.price),form.priceSingle=parseFloat(form.priceSingle),jQuery(this).is('[data-singleprice="true"]')?jQuery(this).is('[data-addtototal!="no"]')&&(form.priceSingle+=parseFloat(jQuery(this).data("price"))*parseFloat(a)):jQuery(this).is('[data-addtototal!="no"]')&&(form.price+=parseFloat(jQuery(this).data("price"))*parseFloat(a)),wpe_updateItemTitleNoReduc(jQuery(this),form)),jQuery(this).find(".quantityBtns").is(".open")&&""==form.imgTitlesStyle&&(0!=form.disableTipMobile&&wpe_is_touch_device()||jQuery(this).b_tooltip("show"))}else jQuery(this).data("resprice","0")}else jQuery(this).data("resqt","0"),jQuery(this).data("price")?("-"==jQuery(this).data("operation")?(jQuery(this).data("resprice",0-parseFloat(jQuery(this).data("price"))),jQuery(this).is('[data-singleprice="true"]')?jQuery(this).is('[data-addtototal!="no"]')&&(form.priceSingle-=parseFloat(jQuery(this).data("price"))):jQuery(this).is('[data-addtototal!="no"]')&&(form.price-=parseFloat(jQuery(this).data("price")))):"x"==jQuery(this).data("operation")?jQuery(this).is('[data-singleprice="true"]')?(jQuery(this).data("resprice",form.priceSingle*parseFloat(jQuery(this).data("price"))/100),jQuery(this).is('[data-addtototal!="no"]')&&(form.priceSingle=form.priceSingle+form.priceSingle*parseFloat(jQuery(this).data("price"))/100)):(jQuery(this).data("resprice",form.price*parseFloat(jQuery(this).data("price"))/100),jQuery(this).is('[data-addtototal!="no"]')&&(form.price=form.price+form.price*parseFloat(jQuery(this).data("price"))/100)):"/"==jQuery(this).attr("data-operation")?jQuery(this).is('[data-singleprice="true"]')?(jQuery(this).data("resprice",0-form.priceSingle*parseFloat(jQuery(this).data("price"))/100),jQuery(this).is('[data-addtototal!="no"]')&&(form.priceSingle=form.priceSingle-form.priceSingle*parseFloat(jQuery(this).data("price"))/100)):(jQuery(this).data("resprice",0-form.price*parseFloat(jQuery(this).data("price"))/100),jQuery(this).is('[data-addtototal!="no"]')&&(form.price=form.price-form.price*parseFloat(jQuery(this).data("price"))/100)):(jQuery(this).data("resprice",jQuery(this).data("price")),jQuery(this).is('[data-singleprice="true"]')?jQuery(this).is('[data-addtototal!="no"]')&&(form.priceSingle+=parseFloat(jQuery(this).data("price"))):jQuery(this).is('[data-addtototal!="no"]')&&(form.price=parseFloat(form.price)+parseFloat(jQuery(this).data("price")))),wpe_updateItemTitleNoReduc(jQuery(this),form)):jQuery(this).data("resprice","0");jQuery(this).is("[data-usecalculationvar]")&&!jQuery(this).is('[data-usecalculationvar="0"]')&&lfb_updateVariable(form,jQuery(this).attr("data-usecalculationvar"),jQuery(this).attr("data-calculationvar"),jQuery(this).attr("data-itemid"))}jQuery(this).is('input[type!="checkbox"][data-usecalculationvar]')&&!jQuery(this).is('[data-usecalculationvar="0"]')&&lfb_updateVariable(form,jQuery(this).attr("data-usecalculationvar"),jQuery(this).attr("data-calculationvar"),jQuery(this).attr("data-itemid")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+n+'"]').trigger("priceUpdated",[jQuery(this).attr("data-itemid")]),lfb_updateItemData(form,jQuery(this).attr("data-itemid"))})),u=form.price,m=form.priceSingle}0"+form.currency+wpe_formatPrice(s,n)+"
"+p+"
"+form.currency+wpe_formatPrice(c,n)+""):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull"),"left"!=form.currencyPosition&&(i=wpe_formatPrice(form.price,n)+""+form.currency,r=wpe_formatPrice(form.priceSingle,n)+""+form.currency,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is("[data-totalrange]")&&0"+wpe_formatPrice(s,n)+form.currency+"
"+p+"
"+wpe_formatPrice(c,n)+form.currency+""):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull")),1==form.showTotalBottom&&(!(l&&0span.lfb_subPrice').remove(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom>br').remove()):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').addClass("lfb_priceSingle"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom').each(function(){0==jQuery(this).find(".lfb_subPrice").length&&jQuery(this).find(">span:eq(0)").after('
+ '+i+"")})),l&&0 span:first-child').html(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:eq(2)').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').hide()):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:eq(2)').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:first-child').html(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span.lfb_subPrice').html("+ "+i),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').show()):(form.price<=0?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').hide():jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .lfb_totalBottom> span:first-child').html(i))),0==form.showSteps&&(!(l&&0span.lfb_subPrice').remove()):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_priceSingle"),0==jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').length&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price>span:eq(0)').after('+ '+i+"")),l&&0 span:first-child').css("top","6px"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').hide()):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("top","-5px"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(r),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').html("+ "+i)):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is('[data-isSubs="true"]')?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","6px"):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","0px"),0 span:first-child').css("position","relative").css("top","0px"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').show()):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(i)),0 span:first-child').length&&(8 span:first-child').html().length?16<=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","16px"):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","18px"),9 span:first-child').html().length&&14<=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","14px"),10 span:first-child').html().length&&11<=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","11px")),y=form.price,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is('[data-isSubs="true"]')&&"single"==form.progressBarPriceType&&(y=form.priceSingle),b=100*y/form.priceMax,1==form.showInitialPrice&&(b=100*(y-parseFloat(form.initialPrice))/form.priceMax),100span:eq(0)').html(y),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').is("[data-totalrange]")&&0"+form.currency+wpe_formatPrice(s,n)+"
"+p+"
"+form.currency+wpe_formatPrice(c,n)+"","left"!=form.currencyPosition&&(_=parseInt(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"]').attr("data-totalrange")),i=o+"
"+wpe_formatPrice(s,n)+form.currency+"
"+p+"
"+wpe_formatPrice(c,n)+form.currency+""),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+n+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(i.replace(//g," "))),wpe_updateSummary(n),l&&0span:eq(0)').html(""+b+"")):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(2)').css("display","inline-block"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').html("+"+i+form.subscriptionText),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').css("display","block"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+n+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(""+b+"
+"+y))):0==form.priceSingle&&0==form.price?(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').css("display","none"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(2)').css("display","none"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(0)').html(i),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+form.formID+'"] #finalPrice span:eq(1)').html(form.subscriptionText)):0==form.priceSingle&&0"+e.currency+wpe_formatPrice(t.data("price"),a)+"
"),t.attr("data-original-label",t.data("originallabel")+" : "+e.currency+wpe_formatPrice(t.data("price"),a)+""),t.attr("data-original-title",t.data("originaltitle")+" : "+e.currency+wpe_formatPrice(t.data("price"),a)+"")):"-"==t.data("operation")?(t.attr("data-original-label",t.data("originallabel")+" : -"+e.currency+wpe_formatPrice(t.data("price"),a)+""),t.attr("title",t.data("originaltitle")+" : -"+e.currency+wpe_formatPrice(t.data("price"),a)+""),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-label",t.data("originallabel")+" : -"+e.currency+wpe_formatPrice(t.data("price"),a)+""),t.attr("data-original-title",t.data("originaltitle")+" : -"+e.currency+wpe_formatPrice(t.data("price"),a)+"")):"x"==t.data("operation")?(t.attr("title",t.data("originaltitle")+" : +"+wpe_formatPrice(t.data("price"),a)+"%"),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-label",t.data("originallabel")+" : +"+wpe_formatPrice(t.data("price"),a)+"%"),t.attr("data-original-title",t.data("originaltitle")+" : +"+wpe_formatPrice(t.data("price"),a)+"%")):(t.attr("title",t.data("originaltitle")+" : -"+wpe_formatPrice(t.data("price"),a)+"%"),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-label",t.data("originallabel")+" : -"+wpe_formatPrice(t.data("price"),a)+"%"),t.attr("data-original-title",t.data("originaltitle")+" : -"+wpe_formatPrice(t.data("price"),a)+"%")),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),wpe_updateLabelItem(t,a)):t.is("[data-tooltiptext]")?t.attr("data-original-title",jQuery(this).attr("data-tooltiptext")):t.attr("data-original-title",t.data("originaltitle")):t.is('[data-showprice="1"]')?("+"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+" : "+wpe_formatPrice(t.data("price"),a)+e.currency+""),t.attr("data-original-title",t.data("originaltitle")+" : "+wpe_formatPrice(t.data("price"),a)+e.currency+"")):"-"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+" : -"+ +wpe_formatPrice(t.data("price"),a)+""),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-title",t.data("originaltitle")+" : -"+wpe_formatPrice(t.data("price"),a)+e.currency+"")):"x"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+" : +"+wpe_formatPrice(t.data("price"),a)+"%"),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-title",t.data("originaltitle")+" : +"+wpe_formatPrice(t.data("price"),a)+"%")):(t.attr("title",t.data("originaltitle")+" : -"+wpe_formatPrice(t.data("price"),a)+"%"),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),t.attr("data-original-title",t.data("originaltitle")+" : -"+wpe_formatPrice(t.data("price"),a)+"%")),0!=e.disableTipMobile&&wpe_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=e.imgTitlesStyle||t.b_tooltip("fixTitle"),wpe_updateLabelItem(t,a)):t.is("[data-tooltiptext]")?t.attr("data-original-title",jQuery(this).attr("data-tooltiptext")):t.attr("data-original-title",t.data("originaltitle")),0 span:first-child').html(r+"/"+t),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] .genPrice .progress .progress-bar').css("width",e+"%")):3==n.showSteps&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #lfb_stepper *:not(#lfb_stepperBar)').remove(),i=!1,o=new Array,jQuery.each(lfb_plannedSteps,function(){i||jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #mainPanel .genSlide[data-stepid="'+this+'"]').is(".lfb_disabled")||!(0');jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #lfb_stepper').append(e),e.b_tooltip({html:!0,container:'#estimation_popup[data-form="'+a+'"]',placement:"bottom"}),p?e.addClass("lfb_disabledPoint"):parseInt(this)==s?(e.addClass("lfb_currentPoint"),p=!0):e.on("click",function(){lfb_returnToStep(parseInt(jQuery(this).attr("data-stepid")),a)});t=100/o.length*t;100!=t&&0!=t||1!=o.length?t+=100/o.length/2:t=50,e.css({left:t+"%"}),parseInt(this)==s&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #lfb_stepper #lfb_stepperBar').css({width:t+"%"})}),"final"==n.step&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+a+'"] #lfb_stepper #lfb_stepperBar').css({width:"100%"}))}function wpe_initPanelResize(t){var e=wpe_getForm(t);jQuery(window).resize(function(){lfb_resize(e)})}function lfb_resizeAll(){jQuery(window).trigger("resize")}function lfb_resize(t){var e=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+t.formID+'"] #mainPanel .genSlide[data-stepid="'+t.step+'"] .stepTitle').height(),e=jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+t.formID+'"] #mainPanel .genSlide[data-stepid="'+t.step+'"] .genContent').outerHeight()+parseInt(jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+t.formID+'"] #mainPanel').css("padding-bottom"))+102+e;"final"==t.step&&(e-=80),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t.formID+'"] #mainPanel').animate({minHeight:e}),1==t.useSignature&&jQuery('#estimation_popup[data-form="'+t.formID+'"] #lfb_signature canvas').attr("width",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t.formID+'"] #lfb_signature').width())}function lfb_rgb2hex(e){if(!(-1 p').slideDown()}function lfb_initRichTextValues(t){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+t+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode)').each(function(){var t=0,e=new Array;parseInt(jQuery(this).closest(".genSlide").attr("data-stepid"));if(void 0!==form.richtextsContent[jQuery(this).attr("data-itemid").toString()]){for(var a=form.richtextsContent[jQuery(this).attr("data-itemid").toString()];-1!=(t=a.indexOf("[variable-",t+1));){var r='';e.push({oldValue:a.substr(t,a.indexOf("]",t)+1-t),newValue:r})}for(t=0;-1!=(t=a.indexOf("item-",t+1));){r='';e.push({oldValue:a.substr(t-1,a.indexOf("]",t)+1-(t-1)),newValue:r})}if(-1';e.push({oldValue:a.substr(t-1,a.indexOf("]",t)+1-(t-1)),newValue:r})}if(-1';e.push({oldValue:a.substr(t-1,a.indexOf("]",t)+1-(t-1)),newValue:r})}var c=new Date,_=c.getMonth()+1;_<10&&(_="0"+_);c.getFullYear().toString(),_.toString(),c.getDate().toString();_=wpe_forms[0].dateFormat.toUpperCase();_=(_=(_=_.replace(/\\\//g,"/")).replace(/d /g,"DD ")).replace(/yyyy/g,"YYYY"),a=(a=(a=a.replace(/\[currentDate\]/g,moment(c).format(_))).replace(/\[total\]/g,'')).replace(/\[total_quantity\]/g,''),jQuery.each(e,function(){a=a.replace(this.oldValue,this.newValue)}),jQuery(this).html(a)}})}function lfb_updateRichTextValues(_){var y=wpe_getForm(_),b=new Date,t=b.getMonth()+1;t<10&&(t="0"+t);var h=b.getFullYear().toString()+t.toString()+b.getDate().toString();jQuery('#estimation_popup.wpe_bootstraped[data-form="'+_+'"] .genSlide[data-stepid="'+y.step+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode) .lfb_richVariable[data-varvariableid]').each(function(){var t=jQuery(this).attr("data-varvariableid"),e=lfb_getVariableByID(y,t),t=0;e&&(t="float"==e.type?wpe_formatPrice(parseFloat(e.value),_):e.value),jQuery(this).html(t)});var j=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=y.step&&-1==jQuery.inArray(parseInt(y.step),j)?j.push(parseInt(y.step)):"final"==y.step&&j.push("final"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+_+'"] .genSlide[data-stepid="'+y.step+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode) .lfb_richVariable:not([data-varvariableid])').each(function(){var t,e,a,r,i,o,p,s,n=parseInt(jQuery(this).closest(".genSlide").attr("data-stepid")),d=jQuery(this).closest(".lfb_richtext").attr("data-itemid"),l=jQuery(this).attr("data-varitemid"),u=jQuery(this).attr("data-action"),m=0,f=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+_+'"] #mainPanel .genSlide [data-itemid="'+l+'"]'),c=f.closest(".genSlide").attr("data-stepid");"final"!=c&&(c=parseInt(c)),"price"==u&&(m=0,-1':""),"value"==u&&(m=-1',"")).replace(" ","")).replace("","")).replace("
",""),size:12345,accepted:!0,kind:"image"},t.emit("addedfile",a),t.files.push(a),t.createThumbnailFromUrl(a,p.imgPreview,function(){t.emit("complete",a)},"anonymous")):$item.is('[data-type="numberfield"]')?0!=r&&($item.is('[data-valueasqt="1"]')?$item.val(r.quantity):$item.val(r.value)):$item.is("select")?0!=r&&$item.val(r.value):$item.is('[data-type="slider"]')?0!=r&&$item.slider("value",parseInt(r.quantity)):$item.is("textarea")?0!=r&&$item.val(r.value):$item.is('input[type="text"]')&&0!=r&&$item.val(r.value)}),t!=e?lfb_lastSteps.push(parseInt(t)):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] [data-stepid="'+t+'"] .errorMsg').hide(),"1"==p.intro_enabled?(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] #startInfos > p').slideDown(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnFloatingSummary').css({display:"inline-block"}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').css({display:"inline-block"}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+p.formID+'"] #btnStart').parent().fadeOut(p.animationsSpeed,function(){"2"!=p.showSteps&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"]').find(".genPrice,#lfb_stepper").fadeIn(p.animationsSpeed),jQuery(' #estimation_popup.wpe_bootstraped[data-form="'+p.formID+'"] #mainPanel').fadeIn(p.animationsSpeed+p.animationsSpeed/2,function(){wpe_changeStep(e,i)})})):wpe_changeStep(e,i))})),setTimeout(function(){jQuery('#estimation_popup.wpe_bootstraped[data-form="'+p.formID+'"] .genSlide.lfb_activeStep').css("opacity",1)},2e3)):(localStorage.removeItem("lfb_formsession"),localStorage.removeItem("lfb_savedFormID"),localStorage.removeItem("lfb_savedForm"),localStorage.removeItem("lfb_savedFormPastSteps"),localStorage.removeItem("lfb_savedFormStep"),localStorage.removeItem("lfb_savedFormTime"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fa").attr("class","fa "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fab").attr("class","fab "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fas").attr("class","fas "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),""!=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm span:not(.fas):not(.fab):not(.fa)').html(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-defaulttext"))):(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fa").attr("class","fa "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fab").attr("class","fab "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').children(".fas").attr("class","fas "+jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-originalicon")),""!=jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm span:not(.fas):not(.fab):not(.fa)').html(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+i+'"] .lfb_btnSaveForm').attr("data-defaulttext"))))}function lfb_getCalendarByID(t){var e=!1;return jQuery.each(lfb_calendars,function(){this.id==t&&(e=this)}),e}function lfb_getDisabledHours(t,r,i,a){var o=new Array,e=lfb_getCalendarByID(t);if(0!=e){var p=jQuery('#estimation_popup .lfb_datepicker[data-calendarid="'+e.id+'"]').is('[data-disableminutes="0"]'),s=parseInt(jQuery('#estimation_popup .lfb_datepicker[data-calendarid="'+e.id+'"]').attr("data-maxevents"));!isNaN(s)&&0!=s||(s=1);var n=a;"mins"==a&&(n="minutes");var d=new Date(r),t=new Array;if(-1=s&&-1==jQuery.inArray(e,o)&&o.push(parseInt(e)))}})}}return o}function lfb_getDisabledMinutes(t,r,i,o,e){var p=new Array,a=lfb_getCalendarByID(t);if(0!=a){var s=parseInt(jQuery('#estimation_popup .lfb_datepicker[data-calendarid="'+a.id+'"]').attr("data-maxevents"));!isNaN(s)&&0!=s||(s=1);var t=lfb_getDisabledHours(t,r,o,e),n=e;"mins"==e&&(n="minutes");e=jQuery('#estimation_popup .lfb_datepicker[data-calendarid="'+a.id+'"]').attr("data-hoursdisabled");if(-1=s&&-1==jQuery.inArray(5*a,p)&&p.push(parseInt(5*a));else if(e.isSame(t,"hour"))for(a=0;a<=11;a++)t.isSame(moment(this.endDate),"hour")?5*a>=t.format("mm")&&5*a=s&&-1==jQuery.inArray(5*a,p)&&p.push(parseInt(5*a))):5*a>=t.format("mm")&&(l[parseInt(5*a)]++,l[parseInt(5*a)]>=s&&-1==jQuery.inArray(5*a,p)&&p.push(parseInt(5*a)));else if(e.isSame(moment(this.endDate),"hour"))for(a=0;a<=11;a++)5*a=s&&-1==jQuery.inArray(5*a,p)&&p.push(parseInt(5*a)))})}return p}function lfb_setAnimImmediate(t){wpe_getForm(t).animationsSpeed=0}function lfb_getCalendarEventsAtDate(t,a){var r=0;return jQuery.each(t.events,function(){var t=moment.utc(this.startDate),e=moment.utc(this.endDate);a.isSameOrAfter(t)&&a.isSameOrBefore(e)&&r++}),r}function lfb_getBusyDates(t,e){var a=wpe_getForm(t);jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_getBusyDates",formID:t,calendarsIDs:e},success:function(t){t=t.trim(),t=JSON.parse(t,!0),lfb_calendars=t.calendars,jQuery.each(t.calendars,function(){var p=this;jQuery('#estimation_popup .lfb_datepicker[data-calendarid="'+this.id+'"]').each(function(){_datepicker=jQuery(this);var o=new Array;jQuery.each(p.events,function(){if(1==this.fullDay){var t=moment.utc(this.startDate),e=moment.utc(this.endDate),a=t.format("YYYY-MM-DD");lfb_getCalendarEventsAtDate(p,t)>=_datepicker.attr("data-maxevents")&&o.push(a);for(var r=1;r<=e.diff(t,"days");r++){var i=t.add(r,"days");lfb_getCalendarEventsAtDate(p,i)>=_datepicker.attr("data-maxevents")&&o.push(i.format("YYYY-MM-DD"))}}else{t=moment.utc(this.startDate),_datepicker.attr("data-eventdurationtype");_datepicker.attr("data-eventdurationtype"),this.startDate=t.format("YYYY-MM-DD HH:mm");e=moment.utc(this.endDate),a=t.format("YYYY-MM-DD");if(1<=e.diff(t,"days")){a=1;0==t.format("m")&&(a=0);for(r=a;r<=e.diff(t,"days");r++){i=t.clone().add(r,"days");o.push(i.format("YYYY-MM-DD"))}}}}),_datepicker.datetimepicker("setDatesDisabled",o)})})}})}function lfb_showWinStripePayment(o){var t=lfb_checkStepItemsValid("final",o.formID);1==o.legalNoticeEnable&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_legalCheckbox').is(":checked")||(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_legalCheckbox').closest(".form-group").addClass("has-error"),t=!1)),t&&lfb_checkCaptcha(o,function(){var t,e,a,r,i=!0;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=jQuery(this).closest(".genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(i=!1)}),0"+lfb_formatPriceWithCurrency(e=parseFloat(e)*(parseFloat(o.percentToPay)/100),o.formID)+"",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(r)):"fixed"==o.payMode&&(r=""+lfb_formatPriceWithCurrency(e=parseFloat(o.fixedToPay),o.formID)+"",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(r)),""==o.stripeToken||void 0!==o.stripeAmountSingle&&o.stripeAmountSingle!=e||void 0!==o.stripeAmountSingle&&o.stripeAmountSub!=a?jQuery.ajax({url:o.ajaxurl,type:"post",data:{action:"lfb_getStripePaymentIntent",singleTotal:e,subTotal:a,formID:o.formID,customerInfos:wpe_getContactInformations(o.formID,!0)},success:function(t){t=JSON.parse(t),o.stripeToken=t.token,o.stripeCustomerID=t.customerID,o.stripeAmountSingle=e,o.stripeAmountSub=a;t=lfb_stripe.elements();o.cardElement=t.create("cardNumber"),o.cardElement.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-element'),o.cardExp=t.create("cardExpiry"),o.cardExp.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_expiration-element'),o.cardExp.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),o.cardCvc=t.create("cardCvc"),o.cardCvc.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_cvc-element'),o.cardCvc.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),o.cardElement.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-panel="form"]').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal .modal-footer").slideDown()}}):(t=lfb_stripe.elements(),o.cardElement=t.create("cardNumber"),o.cardElement.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-element'),o.cardElement.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),o.cardExp=t.create("cardExpiry"),o.cardExp.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_expiration-element'),o.cardExp.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),o.cardCvc=t.create("cardCvc"),o.cardCvc.mount('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_cvc-element'),o.cardCvc.addEventListener("change",function(t){t.error?jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html(t.error.message):jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripe_card-error').html("")}),e=parseFloat(o.price),a=0,jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').is('[data-isSubs="true"]')&&(e=parseFloat(o.priceSingle),a=parseFloat(o.price)),"percent"==o.payMode?(r=""+lfb_formatPriceWithCurrency(e=parseFloat(e)*(parseFloat(o.percentToPay)/100),o.formID)+"",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(r)):"fixed"==o.payMode&&(r=""+lfb_formatPriceWithCurrency(e=parseFloat(o.fixedToPay),o.formID)+"",jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(r)),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-panel="form"]').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal .modal-footer").slideDown()),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripeModal a[data-action="pay"]').unbind("click"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripeModal a[data-action="pay"]').click(function(){var t=!1;jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripeModal .has-error').removeClass("has-error"),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripeModal [name="ownerName"]').val().length<3&&(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] #lfb_stripeModal [name="ownerName"]').closest(".form-group").addClass("has-error"),t=!0),t||(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-panel="loading"]').show(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal .modal-footer").hide(),lfb_stripe.createSource(o.cardElement).then(function(t){t.error?(jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"] [data-info="error"]').html(t.error.message),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),jQuery('#estimation_popup.wpe_bootstraped[data-form="'+o.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):(o.stripeSrc=t.source.id,0